﻿<!-- 
This resource dictionary is used by the MainWindow. 
-->
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <!--
    This template explains how to render the list of commands on the left
    side in the main window (the 'Control Panel' area).
    -->
    <DataTemplate x:Key="CommandsTemplate">
        <ItemsControl IsTabStop="False" ItemsSource="{Binding}" Margin="6,2">                        
        </ItemsControl>
    </DataTemplate>

    <!-- 
    This template explains how to render 
    a tab item with a close button.
    -->
    <DataTemplate x:Key="ClosableTabItemTemplate">
        <DockPanel Width="120">
            <Button
                Command="{Binding Path=CloseCommand}"
                Content="X"
                Cursor="Hand"
                DockPanel.Dock="Right"
                Focusable="False"
                FontFamily="Courier"
                FontSize="9"
                FontWeight="Bold"
                Margin="0,1,0,0"
                Padding="0"
                VerticalContentAlignment="Bottom"
                Width="16" Height="16" />
            <ContentPresenter
                Content="{Binding Path=DisplayName}"
                VerticalAlignment="Center" />
        </DockPanel>
    </DataTemplate>

    <!--
    This template explains how to render the 'Workspace' content area in the main window.
    -->
    <DataTemplate x:Key="WorkspacesTemplate">
        <TabControl
            IsSynchronizedWithCurrentItem="True"
            ItemsSource="{Binding}"
            ItemTemplate="{StaticResource ClosableTabItemTemplate}"
            Margin="4" />
    </DataTemplate>

</ResourceDictionary>